/*
 *  Copyright 2011 yura.
 * 
 *  Licensed under the Apache License, Version 2.0 (the "License");
 *  you may not use this file except in compliance with the License.
 *  You may obtain a copy of the License at
 * 
 *       http://www.apache.org/licenses/LICENSE-2.0
 * 
 *  Unless required by applicable law or agreed to in writing, software
 *  distributed under the License is distributed on an "AS IS" BASIS,
 *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 *  See the License for the specific language governing permissions and
 *  limitations under the License.
 *  under the License.
 */

package org.opu.vcforms.vcapi.domain;

import java.io.Serializable;
import java.sql.Blob;

/**
 *
 * @author yura
 */
public class VcTextTemplate implements Serializable {

    /** Идентификатор */
    private Integer     id;
    /** --D - документ-образец для заполнения, T-XLS/DOC-шаблон для
     * автоматической генерации документа-образца, X-XML-шаблон для
     * автоматической генерации  документа-образца */
    private Character   docType;
    /** имя файла с шаблоном */
    private String      fileName;
    /** содержимое файла */
    private byte[]      fileContent;
    /** дата создания */
    private String      fileDate;

    public Character getDocType() {
        return docType;
    }

    public void setDocType(Character docType) {
        this.docType = docType;
    }

    public byte[] getFileContent() {
        return fileContent;
    }

    public void setFileContent(byte[] fileContent) {
        this.fileContent = fileContent;
    }

    public String getFileDate() {
        return fileDate;
    }

    public void setFileDate(String fileDate) {
        this.fileDate = fileDate;
    }

    public String getFileName() {
        return fileName;
    }

    public void setFileName(String fileName) {
        this.fileName = fileName;
    }

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    @Override
    public boolean equals(Object obj) {
        if (obj == null) {
            return false;
        }

        if (getClass() != obj.getClass()) {
            return false;
        }

        final VcTextTemplate other = (VcTextTemplate) obj;

        if (this.id != other.id && (this.id == null || !this.id.equals(other.id))) {
            return false;
        }

        return true;
    }

    @Override
    public int hashCode() {
        return this.id != null ? this.id.hashCode() : 0;
    }

    @Override
    public String toString() {
        return "VcTextTemplate{" + "id=" + id + "docType=" + docType
                + "fileName=" + fileName + "fileContent=" + fileContent
                + "fileDate=" + fileDate + '}';
    }

}
